#define _CRT_SECURE_NO_WARNINGS 1
#include "HashTable.h"

void Test01() {
	Open_Address::HashTable<int, int> Hash;
	Hash.insert({ 1,1 });
	Hash.insert({ 2,2 });
	Hash.insert({ 3,3 });
	Hash.insert({ 6,6 });
	Hash.insert({ 8,8 });
	Hash.insert({ 15,15 });
	Hash.insert({ 16,16 });
	Hash.insert({ 25,25 });
	Hash.insert({ 37,37 });
	Hash.insert({ 1001,1001 });
	Hash.erase(1001);
	int i = 10;
	if (i == 10) {
		i = 13;
	}
}

void Test02() {
	Hash_Bucket::HashTable<int, int> Hash;
	Hash.insert({ 1,1 });
	Hash.insert({ 2,2 });
	Hash.insert({ 3,3 });
	Hash.insert({ 6,6 });
	Hash.insert({ 8,8 });
	Hash.insert({ 15,15 });
	Hash.insert({ 16,16 });
	Hash.insert({ 25,25 });
	Hash.insert({ 37,37 });
	Hash.insert({ 1001,1001 });
	Hash.erase(1001);
	int i = 10;
	if (i == 10) {
		i = 13;
	}
}

void Test03() {
	Open_Address::HashTable<string, string> hs;
	hs.insert({ "hash", "hash" });
	hs.insert({ "hash2", "hash2" });
	hs.insert({ "hash3", "hash3" });
	hs.insert({ "hash4", "hash4" });
	hs.insert({ "hash6", "hash8" });
	hs.insert({ "hash0", "hash9" });
	hs.insert({ "hash67", "hash4" });
	hs.insert({ "hash698", "hash4" });
	hs.insert({ "hash6978", "hash4" });
	hs.insert({ "hash697822", "hash4" });
	hs.insert({ "hash697833", "hash4" });
	hs.erase("hash697833");
}

void Test04() {
	Hash_Bucket::HashTable<string, string> hs;
	hs.insert({ "hash", "hash" });
	hs.insert({ "hash2", "hash2" });
	hs.insert({ "hash3", "hash3" });
	hs.insert({ "hash4", "hash4" });
	hs.insert({ "hash6", "hash8" });
	hs.insert({ "hash0", "hash9" });
	hs.insert({ "hash67", "hash4" });
	hs.insert({ "hash698", "hash4" });
	hs.insert({ "hash6978", "hash4" });
	hs.insert({ "hash697822", "hash4" });
	hs.insert({ "hash697833", "hash4" });
	hs.erase("hash697833");

	Hash_Bucket::HashTable<string, string> hscopy(hs);

}

int main() {
	Test04();
	return 0;
}